/**
 * ModalSheet 钩子统一导出
 *
 * 🎯 设计理念：
 * 1. 模块化导出：每个钩子独立导出，支持按需引入
 * 2. 类型安全：导出所有相关类型定义
 * 3. 树摇优化：支持 webpack/vite 的 tree-shaking
 * 4. 开发体验：提供清晰的导入路径和文档
 */

// 核心功能钩子
export { useModalSheet, useDraggable, usePortal } from './useModalSheet';

// 吸附点系统钩子
export { useSnapPoints } from './useSnapPoints';

// 调整大小钩子
export { useMultiDirectionResize } from './useMultiDirectionResize';
export { useResizable } from './useResizable';

// 主题系统钩子
export {
  useTheme,
  ThemeProvider,
  ThemeToggle,
  LIGHT_THEME,
  DARK_THEME,
} from './useTheme';

// 动画增强钩子
export {
  AnimationVariantGenerator,
  EASING_FUNCTIONS,
  ANIMATION_PRESETS,
} from './useAnimationEnhancements';

// 无障碍访问钩子
export { useAccessibility } from './useAccessibility';

// 手势识别钩子
export { useGestureRecognition } from './useGestureRecognition';

// 类型定义导出 - 从 types.ts 导出
export type {
  // 基础类型
  Position,
  SnapPoint,
  ModalSheetPosition as ModalPosition,

  // 组件类型
  ModalSheetProps,
  ModalSheetHeaderProps,
  ModalSheetBodyProps,
  ModalSheetFooterProps,
  ModalSheetSize,
  ModalSheetAnimation,
  AnimationPreset,
  ModalSheetContextValue,
  ModalSheetRef,
  Size,
} from '../types';

// 从调整大小钩子导出的类型
export type { ResizeDirection } from './useMultiDirectionResize';

// 从主题钩子导出的类型
export type { ThemeMode, ThemeColors, Theme } from './useTheme';

// 从动画钩子导出的类型
export type {
  EasingFunction,
  AnimationConfig,
  ChainAnimationConfig,
} from './useAnimationEnhancements';

// 重新导出动画增强的类型（别名避免冲突）
export type {
  EasingFunction as AnimationEasingFunction,
  AnimationConfig as ModalAnimationConfig,
  ChainAnimationConfig as ModalChainAnimationConfig,
} from './useAnimationEnhancements';

// ===== 命名空间导出 =====

// 先导入所有需要的钩子
import { useModalSheet, useDraggable, usePortal } from './useModalSheet';
import { useSnapPoints } from './useSnapPoints';
import { useMultiDirectionResize } from './useMultiDirectionResize';
import { useResizable } from './useResizable';
import { useAccessibility } from './useAccessibility';
import { useGestureRecognition } from './useGestureRecognition';
import {
  useTheme,
  ThemeProvider,
  ThemeToggle,
  LIGHT_THEME,
  DARK_THEME,
} from './useTheme';
import {
  AnimationVariantGenerator,
  EASING_FUNCTIONS,
  ANIMATION_PRESETS,
} from './useAnimationEnhancements';

/**
 * ModalSheet 钩子命名空间
 * 使用方式：
 * ```typescript
 * import { ModalSheetHooks } from '@/components/common/ModalSheet/hooks';
 * const { useModalSheet, useSnapPoints } = ModalSheetHooks;
 * ```
 */
export const ModalSheetHooks = {
  // 核心功能
  useModalSheet,
  useDraggable,
  usePortal,

  // 交互功能
  useSnapPoints,
  useMultiDirectionResize,
  useResizable,
  useGestureRecognition,

  // 体验增强
  useTheme,
  useAccessibility,
} as const;

/**
 * 主题系统命名空间
 * 使用方式：
 * ```typescript
 * import { ThemeSystem } from '@/components/common/ModalSheet/hooks';
 * const { useTheme, ThemeProvider, LIGHT_THEME } = ThemeSystem;
 * ```
 */
export const ThemeSystem = {
  useTheme,
  ThemeProvider,
  ThemeToggle,
  LIGHT_THEME,
  DARK_THEME,
} as const;

/**
 * 动画系统命名空间
 * 使用方式：
 * ```typescript
 * import { AnimationSystem } from '@/components/common/ModalSheet/hooks';
 * const { AnimationVariantGenerator, EASING_FUNCTIONS } = AnimationSystem;
 * ```
 */
export const AnimationSystem = {
  AnimationVariantGenerator,
  ANIMATION_PRESETS,
  EASING_FUNCTIONS,
} as const;

/**
 * 钩子使用指南
 *
 * 基础使用：
 * ```typescript
 * import { useModalSheet } from '@/components/common/ModalSheet/hooks';
 * ```
 *
 * 完整功能：
 * ```typescript
 * import {
 *   useModalSheet,
 *   useSnapPoints,
 *   useMultiDirectionResize,
 *   useTheme
 * } from '@/components/common/ModalSheet/hooks';
 * ```
 *
 * 类型导入：
 * ```typescript
 * import type {
 *   ModalPosition,
 *   ResizeDirection,
 *   Theme
 * } from '@/components/common/ModalSheet/hooks';
 * ```
 */
